package com.dubbo.service.impl;

import com.alibaba.dubbo.config.annotation.Service;
import com.dubbo.service.IHelloService;
import org.springframework.stereotype.Component;

@Service(interfaceClass = IHelloService.class)
@Component
public class HelloServiceImpl implements IHelloService{
    @Override
    public String sendMessage(String message){
        System.out.println("message="+message);

        try {
            Thread.sleep(2000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }

        return "quickstart-provider-message="+message;
    }

    @Override
    public String sendMessage2(String message){
        System.out.println("message02="+message);

        try {
            Thread.sleep(4000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }

        return "quickstart-provider-message02 ="+message;
    }
}
